
#include "BodyPart.h"

#include "PrimitiveCreature.h"

#include <iostream>

namespace jcrada {

    PrimitiveCreature::PrimitiveCreature( BodyPart::eShape shape, int hidden_layers, int neurons_per_layer )
    : Creature( 1,0, hidden_layers, neurons_per_layer) {
        setName("PrimitiveCreature");
        setShape(shape);
    }

    PrimitiveCreature::~PrimitiveCreature( ) {
    }

    void PrimitiveCreature::set( const btTransform& at ) {
        getBodyPart(ROOT).setId(ROOT);
        getBodyPart(ROOT).setName("Root");
        getBodyPart(ROOT).setParentId(Creature::B_NONE);
        getBodyPart(ROOT).setShape(getShape());
        getBodyPart(ROOT).setSize(3.0, 2.0, 3.0);
        getBodyPart(ROOT).setMass(1.0);

        btTransform offset;
        offset.setIdentity();
        offset.setOrigin(btVector3(0.0,getBodyPart(ROOT).getSizeY(),0.0));
        Creature::set(at * offset);
    }
}
